Foxit PDF RDK
FoxitPDFViewCtrl.IPageEventListener Class Reference

Public Member Functions

 onPageChanged (oldPageIndex, curPageIndex)
 
 onPageInvisible (index)
 
 onPageJumped ()
 
 onPageMoved (success, index, dstIndex)
 
 onPagesInserted (success, dstIndex, pageRanges[])
 
 onPagesRemoved (success, pageIndexes[])
 
 onPagesRotated (success, pageIndexes[], rotation)
 
 onPagesWillInsert (dstIndex, pageRanges[])
 
 onPagesWillRemove (pageIndexes[])
 
 onPagesWillRotate (pageIndexes[], rotation)
 
 onPageSwiped (oldPageIndex, curPageIndex)
 
 onPageVisible (index)
 
 onPageWillMove (index, dstIndex)
 

Detailed Description

The interface for page event listener.

Note: Currently, this interface does not support xfa documents.

Member Function Documentation

◆ onPageChanged()

FoxitPDFViewCtrl.IPageEventListener.onPageChanged ( oldPageIndex  ,
curPageIndex   
)

Triggered when current page is changed.

Parameters
oldPageIndexOld page index. Valid range: from 0 to (count-1). count is the page count.
curPageIndexCurrent page index. Valid range: from 0 to (count-1). count is the page count.

◆ onPageInvisible()

FoxitPDFViewCtrl.IPageEventListener.onPageInvisible ( index  )

Triggered when the page becomes invisible.

Parameters
indexPage index. Valid range: from 0 to (count-1). count is the page count.

◆ onPageJumped()

FoxitPDFViewCtrl.IPageEventListener.onPageJumped ( )

◆ onPageMoved()

FoxitPDFViewCtrl.IPageEventListener.onPageMoved ( success  ,
index  ,
dstIndex   
)

Triggered when function

Parameters
successtrue means success, while false means failure.
indexThe original index of page which has be moved.
dstIndexThe destination index.
See also
PDFViewCtrlModel.movePage(int, int) is called.

◆ onPagesInserted()

FoxitPDFViewCtrl.IPageEventListener.onPagesInserted ( success  ,
dstIndex  ,
pageRanges  [] 
)

Triggered when function

Parameters
successtrue means success, while false means failure.
dstIndexA page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dstIndex is less than 0, the imported pages will be inserted to the first.
If parameter dstIndex is equal to or larger than current page count, the imported pages will be inserted to the end.
pageRangesAn integer array which contains the page ranges of source PDF document, to be imported.
In this array, 2 numbers are a pair: the first integer is the starting page index, and the second integer is the page count.
This parameter is not null, it should contains at least 2 numbers, and the count of elements should be a multiples of 2.
See also
PDFViewCtrlModel.rotatePages(number[], number) is called.

◆ onPagesRemoved()

FoxitPDFViewCtrl.IPageEventListener.onPagesRemoved ( success  ,
pageIndexes  [] 
)

Triggered when function

Parameters
successtrue means success, while false means failure.
pageIndexesAn integer array specify which pages have be removed.
See also
PDFViewCtrlModel.removePages(int[])} is called.

◆ onPagesRotated()

FoxitPDFViewCtrl.IPageEventListener.onPagesRotated ( success  ,
pageIndexes  [],
rotation   
)

Triggered when function

Parameters
successtrue means success, while false means failure.
pageIndexesAn integer array specify which pages have be rotated.
rotationThe destination rotation value. Please refer to values starting from FoxitRDKNative.e_Rotation0 and this should be one of these values.
See also
PDFViewCtrlModel.rotatePages(int[], int) is called.

◆ onPagesWillInsert()

FoxitPDFViewCtrl.IPageEventListener.onPagesWillInsert ( dstIndex  ,
pageRanges  [] 
)

Triggered when insert some pages.

Parameters
dstIndexA page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dstIndex is less than 0, the imported pages will be inserted to the first.
If parameter dstIndex is equal to or larger than current page count, the imported pages will be inserted to the end.
pageRangesAn integer array which contains the page ranges of source PDF document, to be imported.
In this array, 2 numbers are a pair: the first integer is the starting page index, and the second integer is the page count.
If this parameter is set to null, all pages in the source document will be imported. If this parameter is not null, it should contains at least 2 numbers, and the count of elements should be a multiples of 2.

◆ onPagesWillRemove()

FoxitPDFViewCtrl.IPageEventListener.onPagesWillRemove ( pageIndexes  [])

Triggered when pages will be removed.

Parameters
pageIndexesAn integer array specify which pages will be removed.

◆ onPagesWillRotate()

FoxitPDFViewCtrl.IPageEventListener.onPagesWillRotate ( pageIndexes  [],
rotation   
)

Triggered when pages will be rotated.

Parameters
pageIndexesAn integer array specify which pages will be rotated.
rotationNew page rotation value. Please refer to values starting from FoxitRDKNative.e_Rotation0 and this should be one of these values.

◆ onPageSwiped()

FoxitPDFViewCtrl.IPageEventListener.onPageSwiped ( oldPageIndex  ,
curPageIndex   
)

Triggered when current page is swiped, and on the continuous page mode this method will never be called.

Parameters
oldPageIndexOld page index. Valid range: from 0 to (count-1). count is the page count.
curPageIndexCurrent page index. Valid range: from 0 to (count-1). count is the page count.

◆ onPageVisible()

FoxitPDFViewCtrl.IPageEventListener.onPageVisible ( index  )

Triggered when the page becomes visible.

Parameters
indexPage index. Valid range: from 0 to (count-1). count is the page count.

◆ onPageWillMove()

FoxitPDFViewCtrl.IPageEventListener.onPageWillMove ( index  ,
dstIndex   
)

Triggered when page will be moved.

Parameters
indexThe index of page which will be moved.
dstIndexThe destination index.